<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="周期性执行备份">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001792395444.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
<meta name="DC.Publisher" content="20240320">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="ZH-CN_TOPIC_0000001839194517">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>周期性执行备份</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="ZH-CN_TOPIC_0000001839194517"></a><a name="ZH-CN_TOPIC_0000001839194517"></a>

<h1 class="topictitle1">周期性执行备份</h1>
<div><p>将需要保护的命名空间或StatefulSet关联到指定SLA，系统将按照SLA中定义的配置周期性执行备份。周期性备份产生的副本名称默认为资源名称_时间戳。</p>
<div class="section" id="ZH-CN_TOPIC_0000001839194517__section592472483112"><h4 class="sectiontitle">注意事项</h4><ul id="ZH-CN_TOPIC_0000001839194517__ul112694580218"><li id="ZH-CN_TOPIC_0000001839194517__li0542152665720">请确保生产存储已预留用于备份的快照空间，快照预留空间=源LUN数据量*备份周期内数据变化量百分比。默认情况下，建议预留源LUN容量的20%用于创建快照。</li><li id="ZH-CN_TOPIC_0000001839194517__li31561923235">为确保恢复FlexVolume的数据一致性，备份前用户可配置<span class="uicontrol" id="ZH-CN_TOPIC_0000001839194517__uicontrol14802202710489">“备份前执行脚本”</span>，对Pod中FlexVolume类型的卷进行备份。</li></ul>
</div>
<div class="section"><h4 class="sectiontitle">周期性备份命名空间</h4><ol><li><span>选择<span class="uicontrol" id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001839274437_zh-cn_topic_0000001839142377_uicontrol84751741193812">“<span id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001839274437_zh-cn_topic_0000001839142377_text194759416387">保护</span> &gt; 容器 &gt; Kubernetes FlexVolume”</span>。</span></li><li><span>选择“<span>命名空间</span>”页签，选择需要保护的命名空间。</span></li><li><span>单击<span class="uicontrol">“<span>保护</span>”</span>。</span></li><li><span>选择系统预置或用户自行创建的SLA。</span><p><p>您也可以单击<span class="uicontrol">“<span>创建</span>”</span>，创建新的SLA。</p>
</p></li><li id="ZH-CN_TOPIC_0000001839194517__li1316316472413"><span>选择代理主机。</span><p><p id="ZH-CN_TOPIC_0000001839194517__p979713913166">请选择该资源所在Kubernetes集群节点上部署的所有代理主机。</p>
</p></li><li><span>设置以下参数。</span><p><ol type="a"><li>选择是否覆盖StatefulSet已有的SLA。<div class="p">默认为<span class="uicontrol" style="color:#282B33;">“<span>不覆盖StatefulSet已有的SLA</span>”</span><span style="color:#282B33;">。</span><div class="note"><img src="public_sys-resources/note_3.0-zh-cn.png"><span class="notetitle"> </span><div class="notebody"><p>后续修改命名空间关联的SLA时，修改时选择<span class="uicontrol" style="color:#282B33;">“<span>不覆盖StatefulSet已有的SLA</span>”</span>，如果StatefulSet的SLA与命名空间本身的SLA一致，则StatefulSet的SLA会被覆盖。</p>
</div></div>
</div>
</li><li>选择SLA应用策略，支持同时选择以下一个或多个选项：<ul><li><span>将命名空间的SLA应用到所有未关联SLA的StatefulSet资源</span></li><li><span>将命名空间的SLA应用到新建的StatefulSet资源</span><p>扫描Kubernetes集群后，新发现的StatefulSet将关联与命名空间相同的SLA。</p>
</li></ul>
</li><li>指定保护计划中要排除或包含的StatefulSet。<p>您可以通过StatefulSet名称指定排除或包含部分StatefulSet。</p>
<p>支持精确匹配和模糊匹配StatefulSet名称，模糊匹配规则包括：前缀匹配（如abc*）、后缀匹配（如*abc）、中间匹配（如*abc*）。</p>
</li></ol>
</p></li><li><span>单击<span class="uicontrol" id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001607841256_uicontrol471113581111">“确定”</span>。</span><p><p id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001607841256_p25041111535">如果当前系统时间已晚于该SLA首次备份的开始时间，则关联备份SLA后可以选择在当前立即执行备份或者根据SLA中设置的备份策略等待下次调度。</p>
</p></li></ol>
</div>
<div class="section"><h4 class="sectiontitle">周期性备份StatefulSet</h4><ol><li><span>选择<span class="uicontrol" id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001839274437_zh-cn_topic_0000001839142377_uicontrol84751741193812_1">“<span id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001839274437_zh-cn_topic_0000001839142377_text194759416387_1">保护</span> &gt; 容器 &gt; Kubernetes FlexVolume”</span>。</span></li><li><span>选择“<span>StatefulSet</span>”页签，选择需要保护的StatefulSet。</span></li><li><span>单击<span class="uicontrol">“<span>保护</span>”</span>。</span></li><li><span>排除无需备份的卷。</span><p><p>系统默认开启“自动保护卷”，备份StatefulSet中FlexVolume类型的卷。您可以关闭“自动保护卷”，单击“<span>请选择</span>”手动选择部分FlexVolume类型的卷备份。</p>
</p></li><li><span>选择用户自行创建的SLA。</span><p><p>您也可以单击<span class="uicontrol">“<span>创建</span>”</span>，创建新的SLA。</p>
</p></li><li><span>选择代理主机。</span><p><p id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001839194517_p979713913166">请选择该资源所在Kubernetes集群节点上部署的所有代理主机。</p>
</p></li><li><span>配置自定义脚本信息。</span><p><div class="p">相关参数说明如<a href="#ZH-CN_TOPIC_0000001839194517__table354613271506">表1</a>所示。
<div class="tablenoborder"><a name="ZH-CN_TOPIC_0000001839194517__table354613271506"></a><a name="table354613271506"></a><table cellpadding="4" cellspacing="0" summary="" id="ZH-CN_TOPIC_0000001839194517__table354613271506" frame="border" border="1" rules="all"><caption><b>表1 </b>自定义脚本参数说明</caption><colgroup><col style="width:22.11%"><col style="width:77.89%"></colgroup><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="22.11%" id="mcps1.3.4.2.7.2.1.2.2.3.1.1"><p>参数</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="77.89%" id="mcps1.3.4.2.7.2.1.2.2.3.1.2"><p>说明</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="22.11%" headers="mcps1.3.4.2.7.2.1.2.2.3.1.1 "><p><span>备份前执行脚本</span></p>
</td>
<td class="cellrowborder" rowspan="3" valign="top" width="77.89%" headers="mcps1.3.4.2.7.2.1.2.2.3.1.2 "><p>您可以根据实际需求，配置“备份前执行脚本”、“备份成功执行脚本”和“备份失败执行脚本”，当备份任务事件中出现“开始执行前置任务”提示后，配置的脚本会在对应场景下执行。</p>
<p id="ZH-CN_TOPIC_0000001839194517__p16797181010379"><span style="color:#282B33;">请输入脚本的绝对路径，例如，“/opt/prescript.sh”。请确保脚本已存放在StatefulSet对应的POD中</span>。</p>
<p>对于备份前执行的脚本，脚本执行的回显信息必须包含以下任意一项：</p>
<p>[feedback]status=normal，表示需要对POD中FlexVolume类型的卷进行备份。</p>
<p>[feedback]status=ignore，表示不会对POD中FlexVolume类型的卷进行备份。</p>
<p>[feedback]status=failed，表示备份POD中FlexVolume类型的卷失败。</p>
<p>如果配置了备份前执行脚本，没有以上任意一项回显信息，备份将失败。</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.7.2.1.2.2.3.1.1 "><p><span>备份成功执行脚本</span></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.7.2.1.2.2.3.1.1 "><p><span>备份失败执行脚本</span></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</p></li><li><span>单击<span class="uicontrol" id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001607841256_uicontrol471113581111_1">“确定”</span>。</span><p><p id="ZH-CN_TOPIC_0000001839194517__zh-cn_topic_0000001607841256_p25041111535_1">如果当前系统时间已晚于该SLA首次备份的开始时间，则关联备份SLA后可以选择在当前立即执行备份或者根据SLA中设置的备份策略等待下次调度。</p>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="zh-cn_topic_0000001792395444.html">步骤6：执行备份</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>